package com.example.jichu_1.presenter;

import com.example.jichu_1.bean.BanBean;
import com.example.jichu_1.model.Model;
import com.example.jichu_1.view.IView;

import java.util.List;

public class Presenter implements IPresenter {
    private IView iView;
    private final Model model;

    public Presenter(IView iView) {
        this.iView = iView;
        model = new Model();
    }

    @Override
    public void getbanners() {
        model.getbanners(new ICallBack() {
            @Override
            public void success(List<BanBean.DataBean> banners) {
                iView.success(banners);
            }

            @Override
            public void failed(String error) {
                iView.failed(error);
            }
        });
    }
}
